package 克隆cloneable;

public class Person implements  Cloneable{
    public int age;
    public Tse m;

    public Person(int age) {
        this.age = age;
        this.m = new Tse();
    }

    @Override
    public String toString() {
        return "Person{" +
                "age=" + age +
                '}';
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
       Person tmp = (Person)super.clone();
       tmp.m = (Tse) this.m.clone();
       return tmp;
    }
}
